package test.rpc;

public class RPCConsumer {
	
	public static void main(String[] args) {
		try {
			Class<HelloService> interfaceClass = HelloService.class;
			printArray(interfaceClass.getInterfaces());
	        split();
	        printArray(new Class<?>[] {interfaceClass});
			HelloService service = RpcFramework.refer(interfaceClass, "127.0.0.1", 6666);
			System.out.println(service.hello("zhangsan"));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	static void printArray(Object[] objs) {
		for(Object obj : objs) {
			System.out.println(obj);
		}
	}
	
	static void split() {
		System.out.println("-----------------------------------------");
	}

}
